<?php
// +----------------------------------------------------------------------
// | 07FLYCRM [基于ThinkPHP5.0开发]
// +----------------------------------------------------------------------
// | Copyright (c) 2016-2021 http://www.07fly.xyz
// +----------------------------------------------------------------------
// | Professional because of focus  Persevering because of happiness
// +----------------------------------------------------------------------
// | Author: 开发人生 <goodkfrs@qq.com>
// +----------------------------------------------------------------------

namespace app\ten\validate;

/**
 * 菜单验证器
 */
class TenModule extends TenBase
{
    // 验证规则
    protected $rule =   [

        'name' => 'require',
        'module' => 'require|unique:ten_module',
    ];

    // 验证提示
    protected $message  =   [
        'name.require' => '名称不能为空',
        'module.require' => '模块名称不能为空',
        'module.unique' => '模块名称已存在',
    ];

    // 应用场景
    protected $scene = [
        'add'  => ['name', 'module'],
        'edit' => ['name','module'],
    ];
    
}
